<?php
namespace Home\Model;
use Think\Model;
class InstallModel extends Model {
	public function payment_list($pageNo,$pageSize)
	{    
		
		 $payment=M('payment');
		 $count['count']=$payment->count();
		 $count['countpage']=ceil($count['count']/$pageSize);
		 
		 if($pageNo>=$count['countpage']){
			$pageNo=$count['countpage'];
		 }
		 if($pageNo<=0){
		 	$pageNo=1;
		 }
		 
		 $payment_list=$payment->field('payment_method,id')->limit(($pageNo-1)*$pageSize,$pageSize)->select();
		 
		 $count['pageSize']=$pageSize;
		 $count['pageNo']=$pageNo;
		 $count['num']=$count['countpage']-4;
		
		 $result['payment_list']=$payment_list;
		 $result['count']=$count;
		 $result['data']=$data;
		 return $result;
		 
	}
	
}
?>